%h2
  =_ "pages"
  = image_tag "indicator_arrows.gif",:id=>"busy_page",:style=>"display:none;"
= "<br>"
%table{:style=>"border:1px solid;padding:0px;margin:0px;"}
  %tr
    %td
      %b=_ "Title"
    %td
      %b=_ "Creation"
    %td
      %b=_ "Published"
    %td
      %b=_ "Category"
    %td
      %b=_ "Author"
    %td
      %b=_ "Comments"
    %td
    %td
  - for @media in @medias
    %tr{:id=>"tr"+@media.id.to_s}
      %td= link_to h(HTMLEntities.decode_entities(@media.title)), @settings.url.to_s+"/"+@media.permalink 
      %td= @media.creation.strftime("%d/%m/%Y %H:%M") 
      %td= @media.published==1? _("yes") : _("no") 
      %td= link_to @media.category.name, @settings.url+"/media/category/"+@media.category.name 
      %td= @media.user.login
      %td= @media.comments.size
      %td= button_to _("edit"), :action=>"edit",:id=>@media
      %td= link_to_remote image_tag("cancel.png",:style=>"border:0px;"), :url=>{ :action => 'destroy', :id => @media.id }, :confirm => _("Delete page?") , :loading =>"Element.show('busy_page')",:complete=>"new Effect.Fade('tr#{@media.id}');Element.hide('busy_page')"
= "<br />"
=# link_to theme_image_tag("control_rewind_blue.png",:border =>0), { :page => @media_pages.current.previous } if @media_pages.current.previous 
=#  pagination_links(@media_pages) 
=# link_to theme_image_tag("control_fastforward_blue.png",:border =>0), { :page => @media_pages.current.next } if @media_pages.current.next 
= will_paginate @medias
= "<br>"
= link_to _('New Page'), :action => 'newpage' 
= "<br /><br>"
